package com.sdgakj.study.thread.pc.lock;

/**
 * @Author: Du Ronghong
 * @Description:
 * @Date: Created in 18:42 2018/8/28
 * @Modified By:
 */
public class ProducerThread implements Runnable {
    private Data data ;

    public ProducerThread(Data data) {
        this.data = data;
    }

    @Override
    public void run() {
        while (true){
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            data.add();
        }
    }
}
